

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"fdsafdsa");
    
    CGFloat k = (self.view.frame.size.width-8*4)/2;
    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(8, 0, k, k)];
    view1.backgroundColor = [UIColor redColor];
    UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(view1.frame.origin.x +view1.frame.size.width + 16, 0, k, k)];
    view2.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:view1];
    [self.view addSubview:view2];
    
    NSLog(@"%f",self.view.frame.size.width);

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}

@end
